package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PrductionPlanMapper;
import com.ruoyi.system.domain.PrductionPlan;
import com.ruoyi.system.service.IPrductionPlanService;

/**
 * 生产计划管理Service业务层处理
 * 
 * @author liukangzu
 * @date 2025-04-17
 */
@Service
public class PrductionPlanServiceImpl implements IPrductionPlanService 
{
    @Autowired
    private PrductionPlanMapper prductionPlanMapper;

    /**
     * 查询生产计划管理
     * 
     * @param prductionPlanId 生产计划管理主键
     * @return 生产计划管理
     */
    @Override
    public PrductionPlan selectPrductionPlanByPrductionPlanId(Integer prductionPlanId)
    {
        PrductionPlan prductionPlan = prductionPlanMapper.selectPrductionPlanByPrductionPlanId(prductionPlanId);
        System.out.println(prductionPlan);
        return prductionPlan;
    }

    /**
     * 查询生产计划管理列表
     * 
     * @param prductionPlan 生产计划管理
     * @return 生产计划管理
     */
    @Override
    public List<PrductionPlan> selectPrductionPlanList(PrductionPlan prductionPlan)
    {
        List<PrductionPlan> prductionPlans = prductionPlanMapper.selectPrductionPlanList(prductionPlan);
        System.out.println(prductionPlans);
        return prductionPlans;
    }

    /**
     * 新增生产计划管理
     * 
     * @param prductionPlan 生产计划管理
     * @return 结果
     */
    @Override
    public int insertPrductionPlan(PrductionPlan prductionPlan)
    {
        return prductionPlanMapper.insertPrductionPlan(prductionPlan);
    }

    /**
     * 修改生产计划管理
     * 
     * @param prductionPlan 生产计划管理
     * @return 结果
     */
    @Override
    public int updatePrductionPlan(PrductionPlan prductionPlan)
    {
        return prductionPlanMapper.updatePrductionPlan(prductionPlan);
    }

    /**
     * 批量删除生产计划管理
     * 
     * @param prductionPlanIds 需要删除的生产计划管理主键
     * @return 结果
     */
    @Override
    public int deletePrductionPlanByPrductionPlanIds(Integer[] prductionPlanIds)
    {
        return prductionPlanMapper.deletePrductionPlanByPrductionPlanIds(prductionPlanIds);
    }

    /**
     * 删除生产计划管理信息
     * 
     * @param prductionPlanId 生产计划管理主键
     * @return 结果
     */
    @Override
    public int deletePrductionPlanByPrductionPlanId(Integer prductionPlanId)
    {
        return prductionPlanMapper.deletePrductionPlanByPrductionPlanId(prductionPlanId);
    }

    /**
     * 批量删除生产计划管理
     *
     * @param prductionPlanIds 需要删除的生产计划管理主键
     * @return 结果
     */
    @Override
    public int cancelPrductionPlanByPrductionPlanIds(Integer[] prductionPlanIds) {
        return prductionPlanMapper.cancelPrductionPlanByPrductionPlanIds(prductionPlanIds);
    }

    @Override
    public int cancelPrductionPlanByPrductionPlanId(Integer prductionPlanId) {
        return prductionPlanMapper.cancelPrductionPlanByPrductionPlanId(prductionPlanId);
    }
}
